/**
 * EventType.java
 * Version: 1.0
 * Created in 07/08/2013
 * Created by: Gerson Groth
 * 
 * Copyright
 */
package activities.base.utils;


/**
 * The Enum EventType.
 * 
 * @author Gerson Groth
 */
public enum EventType {

	/** The all. */
	ALL(
			"Any Event Type",
			"all"),

	/** The geocaching. */
	GEOCACHING(
			"Geocaching",
			"geocaching"),

	/** The fitness. */
	FITNESS(
			"Fitness",
			"fitness"),

	/** The recreation. */
	RECREATION(
			"Recreation",
			"recreation"),

	/** The race. */
	RACE(
			"Race",
			"race"),

	/** The special event. */
	SPECIAL_EVENT(
			"Special Event",
			"specialEvent"),

	/** The training. */
	TRAINING(
			"Training",
			"training"),

	/** The transportation. */
	TRANSPORTATION(
			"Transportation",
			"transportation"),

	/** The touring. */
	TOURING(
			"Touring",
			"touring"),

	/** The uncategorized. */
	UNCATEGORIZED(
			"Uncategorized",
			"uncategorized");

	/** The event. */
	private String event;

	/** The value. */
	private String value;

	/**
	 * Instantiates a new event type.
	 * 
	 * @param event
	 *            the event
	 * @param value
	 *            the value
	 */
	EventType(String event, String value) {
		this.event = event;
		this.value = value;
	}

	/**
	 * Gets the event.
	 * 
	 * @return the sport
	 */
	public String getEvent() {
		return event;
	}

	/**
	 * Gets the value.
	 * 
	 * @return the value
	 */
	public String getValue() {
		return value;
	}

	/**
	 * Gets the event.
	 * 
	 * @param name
	 *            the name
	 * @return the event
	 */
	public static EventType getEvent(String name) {
		for (EventType event : EventType.values()) {
			if (event.getEvent().equals(name))
				return event;
		}
		return null;
	}

}
